<template>
	<w-collapse v-model="collapseVisible" disabled :showArrow="false" title="基础信息">
		<el-form ref="form" :model="stationTaskDetails" size="mini" label-width="120px" inline>
			<el-form-item label="工位任务单号：">
				<w-input
					v-model="stationTaskDetails.code"
					disabled
					class="form-item-input"
				></w-input>
			</el-form-item>
			<el-form-item prop="busDate" label="日期：">
				<el-date-picker
					ref="busDate"
					v-model="stationTaskDetails.busDate"
					type="datetime"
					value-format="yyyy-MM-dd HH:mm:00"
					format="yyyy-MM-dd HH:mm"
					placeholder="选择日期"
					:clearable="false"
					disabled
					class="form-item-input"
				></el-date-picker>
			</el-form-item>
			<el-form-item label="产线：">
				<w-input
					v-model="stationTaskDetails.productionLineName"
					disabled
					class="form-item-input"
				></w-input>
			</el-form-item>
			<el-form-item prop="productionPlanDate" label="工位：">
				<w-input
					v-model="stationTaskDetails.stationName"
					disabled
					class="form-item-input"
				></w-input>
			</el-form-item>
			<el-form-item label="生产批次号：">
				<w-input
					v-model="stationTaskDetails.productionBatchNo"
					disabled
					class="form-item-input"
				></w-input>
			</el-form-item>
			<el-form-item label="车间：">
				<w-input
					v-model="stationTaskDetails.carRoomName"
					disabled
					class="form-item-input"
				></w-input>
			</el-form-item>
			<el-form-item label="工序任务单号：">
				<w-input
					v-model="stationTaskDetails.procedureTaskCode"
					disabled
					class="form-item-input"
				></w-input>
			</el-form-item>
			<el-form-item prop="remark" label="整单备注：">
				<w-input
					v-model="stationTaskDetails.remark"
					:maxlength="$fxCommon.getFxInputMaxLength('remark')"
					:regType="$fxCommon.getFxInputReg('remark')"
					:disabled="false"
					class="form-item-input-memo"
				></w-input>
			</el-form-item>
		</el-form>
	</w-collapse>
</template>
<script>
export default {
	name: 'basicInfo',
	props: {
		visibleFlag: Boolean,
		stationTaskDetails: {
			type: Object,
			default: () => {
				return {}
			}
		},
		disabled: Boolean
	},
	data () {
		return {
			collapseVisible: true
		}
	},
	watch: {
		visibleFlag: {
			immediate: true,
			handler (val) {
				if (val) {
					this.refresh()
				}
			}
		}
	},
	methods: {
		refresh () {
			this.$nextTick(() => {
				this.$refs.form.clearValidate()
			})
		},
		validate () {
			return this.$refs.form.validate()
		}
	}
}
</script>
<style lang="stylus" scoped>
@import '~$assets/stylus/varsty.styl'
.form-item-input {
	width: 175px
}
.form-item-input-memo {
	width: 479px
}
.form-switch-input {
	width: 275px
}
.form-input-add-btn {
	position: absolute
	top: 3px
	right: -25px
}
.form-item__plan-message {
	font-size: 10px;
    position: absolute;
    height: 16px;
    line-height: 16px;
	display: flex;
    width: 175px;
    justify-content: space-between;
}
</style>
